package cn.iocoder.yudao.module.call.controller.admin.agent.vo;

import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 外呼调用响应实体类
 */
@Data
public class CallRespVO {

    private boolean success;

    private String reqNo;

    // 主叫号码 仅okcc需要用
    private String caller;

    private String message;

    public static CallRespVO ofOk(String reqNo, String caller) {
        CallRespVO callRespDTO = new CallRespVO();
        callRespDTO.setSuccess(true);
        callRespDTO.setReqNo(reqNo);
        callRespDTO.setCaller(caller);
        return callRespDTO;
    }

    public static CallRespVO ofOk(String reqNo) {
        return ofOk(reqNo, null);
    }

    public static CallRespVO ofError() {
        return ofErrorMsg(null);
    }

    public static CallRespVO ofErrorMsg(String message) {
        CallRespVO callRespDTO = new CallRespVO();
        callRespDTO.setSuccess(false);
        callRespDTO.setMessage(message);
        return callRespDTO;
    }
}
